Optimal. Leaf size=371 \[ \frac {C (a+b x)^2 \sqrt {c+d x} \sqrt {e+f x}}{3 b d f}-\frac {\sqrt {c+d x} \sqrt {e+f x} \left (8 a^2 C d^2 f^2-6 a b d f (4 B d f-3 C (d e+c f))-b^2 \left (C \left (15 d^2 e^2+14 c d e f+15 c^2 f^2\right )+6 d f (4 A d f-3 B (d e+c f))\right )+2 b d f (2 a C d f-b (6 B d f-5 C (d e+c f))) x\right )}{24 b d^3 f^3}+\frac {\left (2 a d f \left (C \left (3 d^2 e^2+2 c d e f+3 c^2 f^2\right )+4 d f (2 A d f-B (d e+c f))\right )-b \left (C \left (5 d^3 e^3+3 c d^2 e^2 f+3 c^2 d e f^2+5 c^3 f^3\right )+2 d f \left (4 A d f (d e+c f)-B \left (3 d^2 e^2+2 c d e f+3 c^2 f^2\right )\right )\right )\right ) \tanh ^{-1}\left (\frac {\sqrt {f} \sqrt {c+d x}}{\sqrt {d} \sqrt {e+f x}}\right )}{8 d^{7/2} f^{7/2}} \]
[Out]
________________________________________________________________________________________
Rubi [A]
time = 0.33, antiderivative size = 369, normalized size of antiderivative = 0.99, number of steps
used = 5, number of rules used = 5, integrand size = 34, \(\frac {\text {number of rules}}{\text {integrand size}}\) = 0.147, Rules used = {1629, 152, 65,
223, 212} \begin {gather*} -\frac {\sqrt {c+d x} \sqrt {e+f x} \left (8 a^2 C d^2 f^2-2 b d f x (-2 a C d f+6 b B d f-5 b C (c f+d e))-6 a b d f (4 B d f-3 C (c f+d e))-\left (b^2 \left (6 d f (4 A d f-3 B (c f+d e))+C \left (15 c^2 f^2+14 c d e f+15 d^2 e^2\right )\right )\right )\right )}{24 b d^3 f^3}+\frac {\tanh ^{-1}\left (\frac {\sqrt {f} \sqrt {c+d x}}{\sqrt {d} \sqrt {e+f x}}\right ) \left (2 a d f \left (4 d f (2 A d f-B (c f+d e))+C \left (3 c^2 f^2+2 c d e f+3 d^2 e^2\right )\right )-b \left (2 d f \left (4 A d f (c f+d e)-B \left (3 c^2 f^2+2 c d e f+3 d^2 e^2\right )\right )+C \left (5 c^3 f^3+3 c^2 d e f^2+3 c d^2 e^2 f+5 d^3 e^3\right )\right )\right )}{8 d^{7/2} f^{7/2}}+\frac {C (a+b x)^2 \sqrt {c+d x} \sqrt {e+f x}}{3 b d f} \end {gather*}
Antiderivative was successfully verified.
[In]
[Out]
Rule 65
Rule 152
Rule 212
Rule 223
Rule 1629
Rubi steps
\begin {align*} \int \frac {(a+b x) \left (A+B x+C x^2\right )}{\sqrt {c+d x} \sqrt {e+f x}} \, dx &=\frac {C (a+b x)^2 \sqrt {c+d x} \sqrt {e+f x}}{3 b d f}+\frac {\int \frac {(a+b x) \left (-\frac {1}{2} b (4 b c C e+a C d e+a c C f-6 A b d f)+\frac {1}{2} b (6 b B d f-2 a C d f-5 b C (d e+c f)) x\right )}{\sqrt {c+d x} \sqrt {e+f x}} \, dx}{3 b^2 d f}\\ &=\frac {C (a+b x)^2 \sqrt {c+d x} \sqrt {e+f x}}{3 b d f}-\frac {\sqrt {c+d x} \sqrt {e+f x} \left (8 a^2 C d^2 f^2-6 a b d f (4 B d f-3 C (d e+c f))-b^2 \left (C \left (15 d^2 e^2+14 c d e f+15 c^2 f^2\right )+6 d f (4 A d f-3 B (d e+c f))\right )-2 b d f (6 b B d f-2 a C d f-5 b C (d e+c f)) x\right )}{24 b d^3 f^3}+\frac {\left (2 a d f \left (C \left (3 d^2 e^2+2 c d e f+3 c^2 f^2\right )+4 d f (2 A d f-B (d e+c f))\right )-b \left (C \left (5 d^3 e^3+3 c d^2 e^2 f+3 c^2 d e f^2+5 c^3 f^3\right )+2 d f \left (4 A d f (d e+c f)-B \left (3 d^2 e^2+2 c d e f+3 c^2 f^2\right )\right )\right )\right ) \int \frac {1}{\sqrt {c+d x} \sqrt {e+f x}} \, dx}{16 d^3 f^3}\\ &=\frac {C (a+b x)^2 \sqrt {c+d x} \sqrt {e+f x}}{3 b d f}-\frac {\sqrt {c+d x} \sqrt {e+f x} \left (8 a^2 C d^2 f^2-6 a b d f (4 B d f-3 C (d e+c f))-b^2 \left (C \left (15 d^2 e^2+14 c d e f+15 c^2 f^2\right )+6 d f (4 A d f-3 B (d e+c f))\right )-2 b d f (6 b B d f-2 a C d f-5 b C (d e+c f)) x\right )}{24 b d^3 f^3}+\frac {\left (2 a d f \left (C \left (3 d^2 e^2+2 c d e f+3 c^2 f^2\right )+4 d f (2 A d f-B (d e+c f))\right )-b \left (C \left (5 d^3 e^3+3 c d^2 e^2 f+3 c^2 d e f^2+5 c^3 f^3\right )+2 d f \left (4 A d f (d e+c f)-B \left (3 d^2 e^2+2 c d e f+3 c^2 f^2\right )\right )\right )\right ) \text {Subst}\left (\int \frac {1}{\sqrt {e-\frac {c f}{d}+\frac {f x^2}{d}}} \, dx,x,\sqrt {c+d x}\right )}{8 d^4 f^3}\\ &=\frac {C (a+b x)^2 \sqrt {c+d x} \sqrt {e+f x}}{3 b d f}-\frac {\sqrt {c+d x} \sqrt {e+f x} \left (8 a^2 C d^2 f^2-6 a b d f (4 B d f-3 C (d e+c f))-b^2 \left (C \left (15 d^2 e^2+14 c d e f+15 c^2 f^2\right )+6 d f (4 A d f-3 B (d e+c f))\right )-2 b d f (6 b B d f-2 a C d f-5 b C (d e+c f)) x\right )}{24 b d^3 f^3}+\frac {\left (2 a d f \left (C \left (3 d^2 e^2+2 c d e f+3 c^2 f^2\right )+4 d f (2 A d f-B (d e+c f))\right )-b \left (C \left (5 d^3 e^3+3 c d^2 e^2 f+3 c^2 d e f^2+5 c^3 f^3\right )+2 d f \left (4 A d f (d e+c f)-B \left (3 d^2 e^2+2 c d e f+3 c^2 f^2\right )\right )\right )\right ) \text {Subst}\left (\int \frac {1}{1-\frac {f x^2}{d}} \, dx,x,\frac {\sqrt {c+d x}}{\sqrt {e+f x}}\right )}{8 d^4 f^3}\\ &=\frac {C (a+b x)^2 \sqrt {c+d x} \sqrt {e+f x}}{3 b d f}-\frac {\sqrt {c+d x} \sqrt {e+f x} \left (8 a^2 C d^2 f^2-6 a b d f (4 B d f-3 C (d e+c f))-b^2 \left (C \left (15 d^2 e^2+14 c d e f+15 c^2 f^2\right )+6 d f (4 A d f-3 B (d e+c f))\right )-2 b d f (6 b B d f-2 a C d f-5 b C (d e+c f)) x\right )}{24 b d^3 f^3}+\frac {\left (2 a d f \left (C \left (3 d^2 e^2+2 c d e f+3 c^2 f^2\right )+4 d f (2 A d f-B (d e+c f))\right )-b \left (C \left (5 d^3 e^3+3 c d^2 e^2 f+3 c^2 d e f^2+5 c^3 f^3\right )+2 d f \left (4 A d f (d e+c f)-B \left (3 d^2 e^2+2 c d e f+3 c^2 f^2\right )\right )\right )\right ) \tanh ^{-1}\left (\frac {\sqrt {f} \sqrt {c+d x}}{\sqrt {d} \sqrt {e+f x}}\right )}{8 d^{7/2} f^{7/2}}\\ \end {align*}
________________________________________________________________________________________
Mathematica [A]
time = 1.06, size = 314, normalized size = 0.85 \begin {gather*} \frac {\sqrt {c+d x} \sqrt {e+f x} \left (6 a d f (4 B d f+C (-3 d e-3 c f+2 d f x))+b \left (6 d f (4 A d f+B (-3 d e-3 c f+2 d f x))+C \left (15 c^2 f^2+2 c d f (7 e-5 f x)+d^2 \left (15 e^2-10 e f x+8 f^2 x^2\right )\right )\right )\right )}{24 d^3 f^3}-\frac {\left (-2 a d f \left (C \left (3 d^2 e^2+2 c d e f+3 c^2 f^2\right )+4 d f (2 A d f-B (d e+c f))\right )+b \left (C \left (5 d^3 e^3+3 c d^2 e^2 f+3 c^2 d e f^2+5 c^3 f^3\right )+2 d f \left (4 A d f (d e+c f)-B \left (3 d^2 e^2+2 c d e f+3 c^2 f^2\right )\right )\right )\right ) \tanh ^{-1}\left (\frac {\sqrt {d} \sqrt {e+f x}}{\sqrt {f} \sqrt {c+d x}}\right )}{8 d^{7/2} f^{7/2}} \end {gather*}
Antiderivative was successfully verified.
[In]
[Out]
________________________________________________________________________________________
Maple [B] Leaf count of result is larger than twice the leaf count of optimal. \(1198\) vs.
\(2(345)=690\).
time = 0.11, size = 1199, normalized size = 3.23
method | result | size |
default | \(\frac {\left (48 B \sqrt {d f}\, \sqrt {\left (d x +c \right ) \left (f x +e \right )}\, a \,d^{2} f^{2}+30 C \sqrt {d f}\, \sqrt {\left (d x +c \right ) \left (f x +e \right )}\, b \,c^{2} f^{2}+30 C \sqrt {d f}\, \sqrt {\left (d x +c \right ) \left (f x +e \right )}\, b \,d^{2} e^{2}-24 B \ln \left (\frac {2 d f x +2 \sqrt {\left (d x +c \right ) \left (f x +e \right )}\, \sqrt {d f}+c f +d e}{2 \sqrt {d f}}\right ) a c \,d^{2} f^{3}-24 B \ln \left (\frac {2 d f x +2 \sqrt {\left (d x +c \right ) \left (f x +e \right )}\, \sqrt {d f}+c f +d e}{2 \sqrt {d f}}\right ) a \,d^{3} e \,f^{2}+18 B \ln \left (\frac {2 d f x +2 \sqrt {\left (d x +c \right ) \left (f x +e \right )}\, \sqrt {d f}+c f +d e}{2 \sqrt {d f}}\right ) b \,c^{2} d \,f^{3}+18 B \ln \left (\frac {2 d f x +2 \sqrt {\left (d x +c \right ) \left (f x +e \right )}\, \sqrt {d f}+c f +d e}{2 \sqrt {d f}}\right ) b \,d^{3} e^{2} f +18 C \ln \left (\frac {2 d f x +2 \sqrt {\left (d x +c \right ) \left (f x +e \right )}\, \sqrt {d f}+c f +d e}{2 \sqrt {d f}}\right ) a \,c^{2} d \,f^{3}+18 C \ln \left (\frac {2 d f x +2 \sqrt {\left (d x +c \right ) \left (f x +e \right )}\, \sqrt {d f}+c f +d e}{2 \sqrt {d f}}\right ) a \,d^{3} e^{2} f +48 A \sqrt {d f}\, \sqrt {\left (d x +c \right ) \left (f x +e \right )}\, b \,d^{2} f^{2}-24 A \ln \left (\frac {2 d f x +2 \sqrt {\left (d x +c \right ) \left (f x +e \right )}\, \sqrt {d f}+c f +d e}{2 \sqrt {d f}}\right ) b \,d^{3} e \,f^{2}-24 A \ln \left (\frac {2 d f x +2 \sqrt {\left (d x +c \right ) \left (f x +e \right )}\, \sqrt {d f}+c f +d e}{2 \sqrt {d f}}\right ) b c \,d^{2} f^{3}+28 C \sqrt {d f}\, \sqrt {\left (d x +c \right ) \left (f x +e \right )}\, b c d e f +16 C b \,d^{2} f^{2} x^{2} \sqrt {\left (d x +c \right ) \left (f x +e \right )}\, \sqrt {d f}+48 A \ln \left (\frac {2 d f x +2 \sqrt {\left (d x +c \right ) \left (f x +e \right )}\, \sqrt {d f}+c f +d e}{2 \sqrt {d f}}\right ) a \,d^{3} f^{3}-15 C \ln \left (\frac {2 d f x +2 \sqrt {\left (d x +c \right ) \left (f x +e \right )}\, \sqrt {d f}+c f +d e}{2 \sqrt {d f}}\right ) b \,c^{3} f^{3}-15 C \ln \left (\frac {2 d f x +2 \sqrt {\left (d x +c \right ) \left (f x +e \right )}\, \sqrt {d f}+c f +d e}{2 \sqrt {d f}}\right ) b \,d^{3} e^{3}-36 B \sqrt {d f}\, \sqrt {\left (d x +c \right ) \left (f x +e \right )}\, b \,d^{2} e f -9 C \ln \left (\frac {2 d f x +2 \sqrt {\left (d x +c \right ) \left (f x +e \right )}\, \sqrt {d f}+c f +d e}{2 \sqrt {d f}}\right ) b \,c^{2} d e \,f^{2}-9 C \ln \left (\frac {2 d f x +2 \sqrt {\left (d x +c \right ) \left (f x +e \right )}\, \sqrt {d f}+c f +d e}{2 \sqrt {d f}}\right ) b c \,d^{2} e^{2} f -36 B \sqrt {d f}\, \sqrt {\left (d x +c \right ) \left (f x +e \right )}\, b c d \,f^{2}+24 B \sqrt {\left (d x +c \right ) \left (f x +e \right )}\, \sqrt {d f}\, b \,d^{2} f^{2} x +12 B \ln \left (\frac {2 d f x +2 \sqrt {\left (d x +c \right ) \left (f x +e \right )}\, \sqrt {d f}+c f +d e}{2 \sqrt {d f}}\right ) b c \,d^{2} e \,f^{2}+24 C \sqrt {\left (d x +c \right ) \left (f x +e \right )}\, \sqrt {d f}\, a \,d^{2} f^{2} x +12 C \ln \left (\frac {2 d f x +2 \sqrt {\left (d x +c \right ) \left (f x +e \right )}\, \sqrt {d f}+c f +d e}{2 \sqrt {d f}}\right ) a c \,d^{2} e \,f^{2}-20 C \sqrt {\left (d x +c \right ) \left (f x +e \right )}\, \sqrt {d f}\, b \,d^{2} e f x -36 C \sqrt {d f}\, \sqrt {\left (d x +c \right ) \left (f x +e \right )}\, a c d \,f^{2}-36 C \sqrt {d f}\, \sqrt {\left (d x +c \right ) \left (f x +e \right )}\, a \,d^{2} e f -20 C \sqrt {\left (d x +c \right ) \left (f x +e \right )}\, \sqrt {d f}\, b c d \,f^{2} x \right ) \sqrt {d x +c}\, \sqrt {f x +e}}{48 f^{3} d^{3} \sqrt {d f}\, \sqrt {\left (d x +c \right ) \left (f x +e \right )}}\) | \(1199\) |
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Maxima [F(-2)]
time = 0.00, size = 0, normalized size = 0.00 \begin {gather*} \text {Exception raised: ValueError} \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Fricas [A]
time = 2.08, size = 729, normalized size = 1.96 \begin {gather*} \left [\frac {3 \, {\left (5 \, C b d^{3} e^{3} + {\left (5 \, C b c^{3} - 16 \, A a d^{3} - 6 \, {\left (C a + B b\right )} c^{2} d + 8 \, {\left (B a + A b\right )} c d^{2}\right )} f^{3} + {\left (3 \, C b c^{2} d - 4 \, {\left (C a + B b\right )} c d^{2} + 8 \, {\left (B a + A b\right )} d^{3}\right )} f^{2} e + 3 \, {\left (C b c d^{2} - 2 \, {\left (C a + B b\right )} d^{3}\right )} f e^{2}\right )} \sqrt {d f} \log \left (8 \, d^{2} f^{2} x^{2} + 8 \, c d f^{2} x + c^{2} f^{2} + d^{2} e^{2} - 4 \, {\left (2 \, d f x + c f + d e\right )} \sqrt {d f} \sqrt {d x + c} \sqrt {f x + e} + 2 \, {\left (4 \, d^{2} f x + 3 \, c d f\right )} e\right ) + 4 \, {\left (8 \, C b d^{3} f^{3} x^{2} + 15 \, C b d^{3} f e^{2} - 2 \, {\left (5 \, C b c d^{2} - 6 \, {\left (C a + B b\right )} d^{3}\right )} f^{3} x + 3 \, {\left (5 \, C b c^{2} d - 6 \, {\left (C a + B b\right )} c d^{2} + 8 \, {\left (B a + A b\right )} d^{3}\right )} f^{3} - 2 \, {\left (5 \, C b d^{3} f^{2} x - {\left (7 \, C b c d^{2} - 9 \, {\left (C a + B b\right )} d^{3}\right )} f^{2}\right )} e\right )} \sqrt {d x + c} \sqrt {f x + e}}{96 \, d^{4} f^{4}}, \frac {3 \, {\left (5 \, C b d^{3} e^{3} + {\left (5 \, C b c^{3} - 16 \, A a d^{3} - 6 \, {\left (C a + B b\right )} c^{2} d + 8 \, {\left (B a + A b\right )} c d^{2}\right )} f^{3} + {\left (3 \, C b c^{2} d - 4 \, {\left (C a + B b\right )} c d^{2} + 8 \, {\left (B a + A b\right )} d^{3}\right )} f^{2} e + 3 \, {\left (C b c d^{2} - 2 \, {\left (C a + B b\right )} d^{3}\right )} f e^{2}\right )} \sqrt {-d f} \arctan \left (\frac {{\left (2 \, d f x + c f + d e\right )} \sqrt {-d f} \sqrt {d x + c} \sqrt {f x + e}}{2 \, {\left (d^{2} f^{2} x^{2} + c d f^{2} x + {\left (d^{2} f x + c d f\right )} e\right )}}\right ) + 2 \, {\left (8 \, C b d^{3} f^{3} x^{2} + 15 \, C b d^{3} f e^{2} - 2 \, {\left (5 \, C b c d^{2} - 6 \, {\left (C a + B b\right )} d^{3}\right )} f^{3} x + 3 \, {\left (5 \, C b c^{2} d - 6 \, {\left (C a + B b\right )} c d^{2} + 8 \, {\left (B a + A b\right )} d^{3}\right )} f^{3} - 2 \, {\left (5 \, C b d^{3} f^{2} x - {\left (7 \, C b c d^{2} - 9 \, {\left (C a + B b\right )} d^{3}\right )} f^{2}\right )} e\right )} \sqrt {d x + c} \sqrt {f x + e}}{48 \, d^{4} f^{4}}\right ] \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Sympy [F]
time = 0.00, size = 0, normalized size = 0.00 \begin {gather*} \int \frac {\left (a + b x\right ) \left (A + B x + C x^{2}\right )}{\sqrt {c + d x} \sqrt {e + f x}}\, dx \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Giac [A]
time = 1.07, size = 447, normalized size = 1.20 \begin {gather*} \frac {{\left (\sqrt {{\left (d x + c\right )} d f - c d f + d^{2} e} \sqrt {d x + c} {\left (2 \, {\left (d x + c\right )} {\left (\frac {4 \, {\left (d x + c\right )} C b}{d^{4} f} - \frac {13 \, C b c d^{11} f^{4} - 6 \, C a d^{12} f^{4} - 6 \, B b d^{12} f^{4} + 5 \, C b d^{12} f^{3} e}{d^{15} f^{5}}\right )} + \frac {3 \, {\left (11 \, C b c^{2} d^{11} f^{4} - 10 \, C a c d^{12} f^{4} - 10 \, B b c d^{12} f^{4} + 8 \, B a d^{13} f^{4} + 8 \, A b d^{13} f^{4} + 8 \, C b c d^{12} f^{3} e - 6 \, C a d^{13} f^{3} e - 6 \, B b d^{13} f^{3} e + 5 \, C b d^{13} f^{2} e^{2}\right )}}{d^{15} f^{5}}\right )} + \frac {3 \, {\left (5 \, C b c^{3} f^{3} - 6 \, C a c^{2} d f^{3} - 6 \, B b c^{2} d f^{3} + 8 \, B a c d^{2} f^{3} + 8 \, A b c d^{2} f^{3} - 16 \, A a d^{3} f^{3} + 3 \, C b c^{2} d f^{2} e - 4 \, C a c d^{2} f^{2} e - 4 \, B b c d^{2} f^{2} e + 8 \, B a d^{3} f^{2} e + 8 \, A b d^{3} f^{2} e + 3 \, C b c d^{2} f e^{2} - 6 \, C a d^{3} f e^{2} - 6 \, B b d^{3} f e^{2} + 5 \, C b d^{3} e^{3}\right )} \log \left ({\left | -\sqrt {d f} \sqrt {d x + c} + \sqrt {{\left (d x + c\right )} d f - c d f + d^{2} e} \right |}\right )}{\sqrt {d f} d^{3} f^{3}}\right )} d}{24 \, {\left | d \right |}} \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Mupad [B]
time = 105.19, size = 2500, normalized size = 6.74 \begin {gather*} \text {Too large to display} \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________